package cn.gwm.flink.streaming.factory;

import cn.gwm.flink.streaming.constant.VehiclePowerType;
import cn.gwm.flink.streaming.function.map.TermalWaringNullEvMapFunction;
import cn.gwm.flink.streaming.function.map.TermalWaringNullPhevMapFunction;
import org.apache.flink.api.common.functions.MapFunction;

import java.util.HashMap;
import java.util.Map;

/**
 * 热失控空值处理简单工厂类
 * @author GW00283474
 */
public class TermalWaringNullHandleFactory {

    private static Map<VehiclePowerType, MapFunction> map = new HashMap<>(0);
    static {
        map.put(VehiclePowerType.EV, new TermalWaringNullEvMapFunction());
        map.put(VehiclePowerType.PHEV,new TermalWaringNullPhevMapFunction());
    }

   public  static MapFunction getTermalWaringNullMapFunction(VehiclePowerType vehiclePowerType){
        return map.get(vehiclePowerType);
    }
}
